Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_engine.h File Reference

Structure for engine. More...

Macros

#define KZU_ENGINE_DEFAULT_QUICK_MEMORY_SIZE
 Amount of quick memory used by engine. More...
 
#define KZU_ENGINE_DEFAULT_VERTEX_BUFFER_POOL_SIZE
 Default vertex buffer pool size. More...
 
#define KZU_ENGINE_DEFAULT_INDEX_BUFFER_POOL_SIZE
 Default index buffer pool size. More...
 

Enumerations

enum  KzuEngineLoadingMeasurement { KZU_ENGINE_LOADING_MEASUREMENT_RENDERER }
 Engine loading time measurement constants. More...
 

Functions

kzsError kzuEngineCreate (const struct KzcMemoryManager *memoryManager, kzUint quickMemorySize, struct KzuUIDomain *uiDomain, struct KzuEngine **out_engine)
 Create a new engine and necessary components for it, such as renderer and its default materials. More...
 
kzsError kzuEngineDelete (struct KzuEngine *engine)
 Deletes an engine. More...
 
kzsError kzuEngineCreateLightweight (const struct KzcMemoryManager *memoryManager, kzUint quickMemorySize, struct KzuUIDomain *uiDomain, struct KzuEngine **out_engine)
 Creates lightweight version of engine, which does only necessary initialization to operate engine (no default materials created). More...
 
kzsError kzuEngineUpdate (struct KzuEngine *engine)
 Updates engine state. More...
 
kzsError kzuEngineCreateTransformGizmo (struct KzuEngine *engine)
 Create transform gizmo. More...
 
struct KzuTransformGizmokzuEngineGetTransformGizmo (const struct KzuEngine *engine)
 Get the transform gizmo (may return NULL). More...
 
void kzuEngineSetActiveCanvas (struct KzuEngine *engine, const struct KzuCanvas *canvas)
 Sets active canvas for engine. More...
 
struct KzuCanvaskzuEngineGetActiveCanvas (const struct KzuEngine *engine)
 Gets active canvas that engine has. More...
 
kzsError kzuEngineBeginFrame (struct KzuEngine *engine)
 Starts a frame for engine rendering. More...
 
kzsError kzuEngineEndFrame (struct KzuEngine *engine)
 Ends a frame for engine rendering . More...
 
void kzuEngineSetMinimumDeltaTime (struct KzuEngine *engine, kzUint minimumDeltaTime)
 Sets minimum delta time for engine. More...
 
kzsError kzuEngineLimitFrameRate (struct KzuEngine *engine)
 Enforces minimum delta time for engine. More...
 
kzUint kzuEngineGetDeltaWallTime (const struct KzuEngine *engine)
 Returns the wall time interval between the two latest updates. More...
 
void kzuEngineMeasurePerformance (struct KzuEngine *engine)
 Updates engine FPS calculations. More...
 
kzFloat kzuEngineGetFramesPerSecond (const struct KzuEngine *engine)
 Gets frames per second from engine (FPS), measuring the overall frames per second. More...
 
void kzuEngineSetGPUCallsEnabled (struct KzuEngine *engine, kzBool enabled)
 Sets GPU calls enabled / disabled. More...
 
struct KzuRendererkzuEngineGetRenderer (const struct KzuEngine *engine)
 Returns user renderer from engine. More...
 
kzUint kzuEngineGetLoadingTime (const struct KzuEngine *engine, enum KzuEngineLoadingMeasurement measurement)
 Gets loading time measurement from engine. More...
 

Detailed Description

Structure for engine.

Contains pipeline specific assets (current scene, renderer), timer, etc.

Copyright 2008-2019 by Rightware. All rights reserved.

Macro Definition Documentation

#define KZU_ENGINE_DEFAULT_QUICK_MEMORY_SIZE

Amount of quick memory used by engine.

#define KZU_ENGINE_DEFAULT_VERTEX_BUFFER_POOL_SIZE

Default vertex buffer pool size.

#define KZU_ENGINE_DEFAULT_INDEX_BUFFER_POOL_SIZE

Default index buffer pool size.

Enumeration Type Documentation

Engine loading time measurement constants.

Enumerator
KZU_ENGINE_LOADING_MEASUREMENT_RENDERER 

Renderer loading time.

Function Documentation

kzsError kzuEngineCreate ( const struct KzcMemoryManager memoryManager,
kzUint  quickMemorySize,
struct KzuUIDomain uiDomain,
struct KzuEngine **  out_engine 
)

Create a new engine and necessary components for it, such as renderer and its default materials.

kzsError kzuEngineDelete ( struct KzuEngine engine)

Deletes an engine.

kzsError kzuEngineCreateLightweight ( const struct KzcMemoryManager memoryManager,
kzUint  quickMemorySize,
struct KzuUIDomain uiDomain,
struct KzuEngine **  out_engine 
)

Creates lightweight version of engine, which does only necessary initialization to operate engine (no default materials created).

kzsError kzuEngineUpdate ( struct KzuEngine engine)

Updates engine state.

Should be called once per frame.

kzsError kzuEngineCreateTransformGizmo ( struct KzuEngine engine)

Create transform gizmo.

struct KzuTransformGizmo* kzuEngineGetTransformGizmo ( const struct KzuEngine engine)

Get the transform gizmo (may return NULL).

void kzuEngineSetActiveCanvas ( struct KzuEngine engine,
const struct KzuCanvas canvas 
)

Sets active canvas for engine.

struct KzuCanvas* kzuEngineGetActiveCanvas ( const struct KzuEngine engine)

Gets active canvas that engine has.

kzsError kzuEngineBeginFrame ( struct KzuEngine engine)

Starts a frame for engine rendering.

kzsError kzuEngineEndFrame ( struct KzuEngine engine)

Ends a frame for engine rendering .

void kzuEngineSetMinimumDeltaTime ( struct KzuEngine engine,
kzUint  minimumDeltaTime 
)

Sets minimum delta time for engine.

kzsError kzuEngineLimitFrameRate ( struct KzuEngine engine)

Enforces minimum delta time for engine.

kzUint kzuEngineGetDeltaWallTime ( const struct KzuEngine engine)

Returns the wall time interval between the two latest updates.

void kzuEngineMeasurePerformance ( struct KzuEngine engine)

Updates engine FPS calculations.

Should be called once per frame.

kzFloat kzuEngineGetFramesPerSecond ( const struct KzuEngine engine)

Gets frames per second from engine (FPS), measuring the overall frames per second.

void kzuEngineSetGPUCallsEnabled ( struct KzuEngine engine,
kzBool  enabled 
)

Sets GPU calls enabled / disabled.

struct KzuRenderer* kzuEngineGetRenderer ( const struct KzuEngine engine)

Returns user renderer from engine.

kzUint kzuEngineGetLoadingTime ( const struct KzuEngine engine,
enum KzuEngineLoadingMeasurement  measurement 
)

Gets loading time measurement from engine.